<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>人才精英赛报名名单</title>
	<style type="text/css">
		table {
			border-collapse: collapse;
			text-align: center;
		}

		table td,
		table th {
			border: 1px solid #cad9ea;
			color: #666;
			height: 30px;
			padding-left: 20px;
			padding-right: 20px;
		}

		table thead th {
			background-color: #CCE8EB;
		}

		table tr:nth-child(odd) {
			background: #fff;
		}

		table tr:nth-child(even) {
			background: #F5FAFA;
		}
	</style>
	<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
</head>

<body>
	<p>人才精英赛报名名单:</p>
	<table border="1" id="tableList"></table>
	<script type="text/javascript">
		function getH() {
			$.ajax({
				url: "http://123.56.72.86:7001/ren/findAll",
				type: "GET",
				success: function (data) {
					var tab = '<tr><th>姓名</th><th>手机</th><th>邮箱</th><th>学校院系</th><th>报名时间</th></tr>';
					for (var i = 0; i < data.length; i++) {
						tab += '<tr><td>' + data[i].name +
							'</td><td>' + data[i].phone +
							'</td><td>' + data[i].mail +
							'</td><td>' + data[i].xi +
							'</td><td>' + data[i].creat_time;
					}
					$("#tableList").html(tab);
				},
				error: function (e) {
					console.log(e);
					alert('网络失败，请刷新页面后重试');
				}
			});
		}
		disp_prompt();

		function disp_prompt() {
			var k = prompt("口令", "")
			if (k != 888888) {
				document.write("...")
			} else {
				getH()
			}
		}
	</script>
</body>

</html>